package com.zb.service;

import com.zb.common.exception.BusinessException;
import com.zb.common.po.enums.UserStatus;
import com.zb.common.po.model.User;
import com.zb.common.po.query.UserQuery;
import com.zb.common.utils.PaginationResult;

public interface UserService {

    /**
     * login:(登录). <br/>
     *
     * @author 多多洛
     * @param account
     * @param password
     * @return
     * @throws BusinessException
     * @since JDK 1.7
     */
    public User login(String account, String password) throws BusinessException;

    /**
     * findUsersCount:(查询用户数量)
     * 
     * @author luohaili
     * @param query
     *            TODO
     * @return
     * @since JDK 1.7
     */
    public int findUsersCount(UserQuery query) throws Exception;

    /**
     * findUsers4Page:(分页查询)
     * 
     * @author luohaili
     * @param userQuery
     *            TODO
     * @return
     * @since JDK 1.7
     */
    public PaginationResult<User> findUsersByPage(UserQuery userQuery)
            throws Exception;

    /**
     * findUserByUserId:(更具用户ID查询用户信息). <br/>
     *
     * @author 多多洛
     * @param userId
     * @return
     * @throws Exception
     * @since JDK 1.7
     */
    public User findUserByUserId(String userId) throws Exception;

    /**
     * saveUser:(保存用户)
     * 
     * @author luohaili
     * @throws BusinessException
     * @since JDK 1.7
     */
    public void saveUser(User user) throws BusinessException;

    /**
     * updateUserStatus:(更新用户状态).
     *
     * @author 多多洛
     * @throws BusinessException
     * @since JDK 1.7
     */
    public void updateUserStatus(Integer[] userIds, UserStatus userStatus)
            throws BusinessException;

    /**
     * delteUser:(删除用户信息)
     *
     * @author 多多洛
     * @param userIds
     * @throws BusinessException
     * @since JDK 1.7
     */
    public void delteUser(Integer[] userIds) throws BusinessException;

    /**
     * 修改个人信息 updateUserSelf:(这里用一句话描述这个方法的作用). <br/>
     *
     * @author 多多洛
     * @param user
     * @throws BusinessException
     * @since JDK 1.7
     */
    public void updateUserSelf(String oldPwd, User user)
            throws BusinessException;

    /**
     * 通过userId获取用户信息 getUserByUserId:(这里用一句话描述这个方法的作用). <br/>
     *
     * @author 多多洛
     * @param userId
     * @param userStatus
     * @param whithPwd
     * @return
     * @since JDK 1.7
     */
    public User getUserByUserId(String userId, UserStatus userStatus,
            boolean whithPwd) throws BusinessException;

    /**
     * 通过account获取用户信息 getUserByUserId:(这里用一句话描述这个方法的作用). <br/>
     *
     * @author 多多洛
     * @param userId
     * @param userStatus
     * @param getPassword
     * @return
     * @since JDK 1.7
     */
    public User getUserByAccount(String account, UserStatus userStatus,
            boolean whithPwd) throws BusinessException;

}
